package com.xmin.lecture.manus.gateway;

import jep.Interpreter;
import jep.SharedInterpreter;

public class JepBasicExample {

    public static void main(String[] args) {
        try (Interpreter interp = new SharedInterpreter()) {
            interp.exec("import sys");
            interp.exec("sys.path.append('D:/lecture/lecture-open-manus/python')");
            interp.exec("from gateway import python_file");
            interp.exec("result = python_file.greet('World')");
            String result = interp.getValue("result", String.class);
            System.out.println(result);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

}
